/**
 * FileName: PatientService
 * Author:   P
 * Date:     2021/2/24 13:55
 * Description:
 */
package com.hospital.nurse.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hospital.nurse.mapper.PatientMapper;
import com.hospital.nurse.pojo.Patient;
import com.hospital.nurse.service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PatientServiceImpl extends ServiceImpl<PatientMapper,Patient> implements PatientService {


    @Autowired
    private PatientMapper mapper;

    @Override
    public PageInfo<Patient> findAllPatient(int page) {
        PageHelper.startPage(page,5);
        return new PageInfo<>(mapper.findAllPatient());
    }
}
